<!-- 会员详情列表 -->
<template>
  <el-form :data="vipInfo" label-position="right" label-width="80px" border>
    <el-form-item label="会员编号">
      <el-input v-model="vipInfo.vipId" disabled/>
    </el-form-item>
    <el-form-item label="会员昵称">
      <el-input v-model="vipInfo.nickname" disabled/>
    </el-form-item>
    <el-form-item label="会员性别">
      <el-input v-model="vipInfo.sex" disabled/>
    </el-form-item>
    <el-form-item label="会员生日">
      <el-input v-model="vipInfo.birthday" disabled/>
    </el-form-item>
    <el-form-item label="会员头像">
      <el-image :src="baseImagePath+vipInfo.avatar" style="height: 100px"/>
    </el-form-item>
    <el-form-item label="城市">
      <el-input v-model="vipInfo.city" disabled/>
    </el-form-item>
    <el-form-item label="手机">
      <el-input v-model="vipInfo.phone" disabled/>
    </el-form-item>
    <el-form-item label="职业">
      <el-input v-model="vipInfo.job" disabled/>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: 'VipInfo',
  data () {
    return {
      loading: false,
      vipInfo: {},
      baseImagePath: process.env.VUE_APP_BASE_API + '/img/'
    }
  },
  methods: {
    init (vipId) {
      this.$http.get(`/sys/vip/info/${vipId}`).then(({ data }) => {
        if (data.code === 200) {
          this.vipInfo = data.data
        }
      })
    }
  },
  created () {
    this.$nextTick(() => {
      this.init()
    })
  }
}
</script>

<style scoped lang="scss">

</style>
